<template>
    <el-select v-model="value" placeholder="售卖状态" clearable style="width:100px">
        <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</template>

<script>

    export default {
        props: {
            status: {
                type:String,
                default:'1'
            }
        },
        data() {
            return {
                value: '',
                options: [
                    { label:'售卖中', value:'1'},
                    { label:'仓库中', value:'0'}
                ]
            };
        },
        watch: {
            status(status) {
                console.log('状态',status)
                this.value = status;
            },
            value(value){
                this.$emit('update:status',value)
            }
        },
        mounted() {},
        methods: {

        }
    };
</script>
